Writing
PUT (/api/v2/:collection/:model/:id()
POST (/api/v2/:collection/:model()
Custom fields can be written to along with standard fields when updating or creating a new entity. Custom fields should be submitted as key:value pairs within the ‘custom_fields’ attribute, as returned by:
GET (/api/v2/:collection/:model/:id()
Example Usage:
curl https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/crm/contacts/1
-H "Content-Type: application/json" -k -u (login):(password) -d
'{"custom_fields":{"field_2": "greetings dude", "field_5": "my text"}}'
statuscode 200
no error
statuscode 400
type error or invalid choice/multichoice value
statuscode 404
does not exist
On success the status code will be 200, and the complete entity will be returned, with custom fields in the custom_field attribute, as normal. Example response:
{
"account_id": 1,
"address_country_id": "UK",
"address_locality": "",
"address_postcode": "",
"address_region": "",
"address_street": "",
"address_town": "",
"address_unit": "",
"company_id": 0,
"created_on": "2003-10-10T00:00:00",
"custom_fields": {
"field_2": "greetings dude",
"field_3": null,
"field_5": "my text"
},
"dont_mail": null,
"email": "alex@acme.com",
"first_name": "john",
"id": 1,
"last_name": "Smith"
}